const fs = require('fs');
const path = require( 'path' );

let pathname = path.resolve( __dirname , 'hello.txt' );

let content = '落霞与孤鹜齐飞，秋水共长天一色';

let options = 'utf8';

console.log('即将输入');
fs.writeFileSync(pathname,content,options);
console.log('输出成功');